{extend name="base" /} {block name="body"}
<div class="layui-body">
	<!--tab标签-->
	<div class="layui-tab layui-tab-brief">
		<ul class="layui-tab-title">
			<li class="layui-this">矿机列表</li>
		</ul>
		<div class="layui-tab-content">
			<div class="layui-tab-item layui-show">
				<form class="layui-form layui-form-pane" action="{:url('machine')}" method="get">
					<div class="layui-inline">
						<label class="layui-form-label">用户账号</label>
						<div class="layui-input-inline">
							<input type="text" name="keyword" value="{$keyword}" placeholder="请输入用户账号" class="layui-input">
						</div>
					</div>
					<div class="layui-inline">
						<select name="ziduan">
							<option value="id" {if $ziduan=='id' }selected{/if}>会员ID</option>
							<option value="mobile" {if $ziduan=='mobile' }selected{/if}>会员账号</option>
						</select>
					</div>
					<div class="layui-inline">
						<label class="layui-form-label">矿机类型</label>
						<div class="layui-input-inline">
							<select name="mid">
								<option value=""></option>
								{foreach name="machines" id="vo"}
								<option value="{$vo.id}" {if $vo.id==$mid}selected{/if}>{$vo.name}</option>
								{/foreach}
							</select>
						</div>
					</div>
					<div class="layui-inline">
						<button class="layui-btn">搜索</button>
					</div>
					<br><br>
					<div class="layui-inline">
						{$machines[$mid-1]['name']|default='全部矿机'}总数：{$total_machine}。
					</div>
				</form>
				<hr>
				<table class="layui-table">
					<thead>
						<tr>
							<th>会员ID</th>
							<th>会员账号</th>
							<th>矿机</th>
							<th>今日产币</th>
							<th>总产币</th>
							<th>购买时间</th>
							<th>挖币时间</th>
							<th>操作</th>
						</tr>
					</thead>
					<tbody>
						{foreach name="list" item="vo"}
						<tr>
							<td>{$vo.uid}</td>
							<td>{$vo.mobile}</td>
							<td>{$machines[$vo.mid-1]['name']}</td>
							<td>{$vo.today}</td>
							<td>{$vo.total}</td>
							<td>{$vo.add_time}</td>
							<td>{$vo.wa_time}</td>
							<td style="height: 30px;">
								<a href="{:url('order/machine_delete',['id'=>$vo['id']])}" class="layui-btn layui-btn-danger layui-btn-small ajax-delete">删除</a>
							</td>
						</tr>
						{/foreach}
					</tbody>
				</table>
				<!--分页-->
				{$list->render()}
			</div>
		</div>
	</div>
</div>
<script>
	// 定义全局JS变量
	var GV = {
		current_controller: "adminjcb/{$controller}/machine"
	};
</script>
{/block}